<?php

namespace app\api\validate;

use tmcore\base\BaseValidate;

/**
 * 验证码验证器
 */
class CaptchaValidate extends BaseValidate
{
    protected $rule = [
        'scene' => 'require',
        'mobile' => 'require|mobile',
    ];

    protected $message = [
        'scene.require' => '请输入场景值',
        'mobile.require' => '请输入手机号',
        'mobile.mobile' => '手机号格式不符',
    ];

    /**
     * 验证检验
     * @return CaptchaValidate
     */
    public function sceneCheck()
    {
        return $this->only(['scene','mobile']);
    }
}